package com.framewiki.example.client;

import com.cdkjframework.cloud.config.FeignConfig;
import com.cdkjframework.cloud.loadbalancer.LoadBalancerConfiguration;
import com.cdkjframework.exceptions.GlobalException;
import com.framewiki.example.entity.RmsUserDto;
import com.framewiki.example.factory.RmsUserFactory;
import org.springframework.cloud.loadbalancer.annotation.LoadBalancerClient;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

/**
 * @ProjectName: framewiki-example
 * @Package: com.framewiki.example.client
 * @ClassName: RmsUserClient
 * @Description: 用户接口
 * @Author: xiaLin
 * @Version: 1.0
 */

@LoadBalancerClient(name = "com.lesmarthome.bms", configuration = LoadBalancerConfiguration.class)
@FeignClient(name = "com.lesmarthome.bms", configuration = FeignConfig.class, fallbackFactory = RmsUserFactory.class)
public interface RmsUserClient {

  /**
   * 查询批量的账户信息
   *
   * @param userDto 条件
   * @return 账户信息
   */
  @PostMapping("/api/bms/user/listRmsUser")
  List<RmsUserDto> listRmsUser(RmsUserDto userDto);
}
